<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <script src="../../../node_modules/jquery/dist/jquery.min.js"></script>
    <link rel="stylesheet" type="text/css" href="../../../node_modules/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="../../../node_modules/bootstrap-datepicker/dist/css/bootstrap-datepicker.min.css">
    <script src="../../../node_modules/bootstrap-datepicker/dist/js/bootstrap-datepicker.min.js"></script>
    <script src="../../../node_modules/bootstrap-datepicker/dist/locales/bootstrap-datepicker.zh-CN.min.js"></script>
    <script src="../../../node_modules/bootstrap/dist/js/bootstrap.js"></script>
    <script type="text/javascript" src="../../../node_modules/highcharts/highcharts.js"></script>
    <script type="text/javascript" src="../../../node_modules/mockjs/dist/mock-min.js"></script>
    <script type="text/javascript" src="../../common/charts.js"></script>
    <script type="text/javascript" src="../../common/chartsData.js"></script>
    <script type="text/javascript" src="../../common/chartsInitialize.js"></script>
    <script type="text/javascript">
        $(function () {
            forselect();
        });

        function getChart(space) {
            if (space > 1) {
                energy_statistic.xAxis = getMonth(space);
                var data = energy_statistic.xAxis;
                energy_statistic.series[0].data = getRandom900h1200h2(data.length);
                energy_statistic.series[1].data = getRandom900h1200h2(data.length);
            } else {
                energy_statistic.xAxis = getDate(space);
                var data = energy_statistic.xAxis;
                energy_statistic.series[0].data = getRandom30h40h2(data.length);
                energy_statistic.series[1].data = getRandom30h40h2(data.length);
            }
            stackbar('container', energy_statistic.title, energy_statistic.subtitle,
                    energy_statistic.xAxis, energy_statistic.yAxis, energy_statistic.series, energy_statistic.unit);
        }

        function forselect() {
            var space = getSpace();
            getChart(space);
        }
    </script>
</head>
<body>
<div style="padding: 5px 10px;background-color: #E6EFF8">
    <h5>
        <a style="color: black">集团公司 > 公司统计 > 能耗统计</a>
    </h5>
</div>
<div style="margin: 10px 10px 50px 10px">
    <form class="form-inline">
        <div class="form-group">
            <label for="startDate">开始日期：</label>
            <div class="input-group date" id="startDiv">
                <input type="text" class="form-control" style="width:150px;" value="2016-04-22" placeholder="请输入开始日期" readonly
                       id="startDate">
                <span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
            </div>
        </div>
        <div class="form-group">
            <label for="startDate">结束日期：</label>
            <div class="input-group date" id="endDiv">
                <input type="text" class="form-control" style="width:150px;" value="2016-04-22" placeholder="请输入开始日期" readonly
                       id="endDate">
                <span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
            </div>
        </div>
        <label class="radio-inline">
            <input type="radio" name="inlineRadioOptions" id="inlineRadio1" value="option1" onclick="getlastweek()"> 上一周
        </label>
        <label class="radio-inline">
            <input type="radio" name="inlineRadioOptions" id="inlineRadio2" value="option2" onclick="getlastmonth()">
            上一月
        </label>
        <label class="radio-inline">
            <input type="radio" name="inlineRadioOptions" id="inlineRadio3" value="option3" onclick="getlastyear()"> 去年
        </label>
        <button type="button" class="btn btn-default" onclick="forselect()">查询</button>
    </form>
</div>
<div id="container" style="width: 100%;height: 100%;"></div>
</body>
</html>